<!DOCTYPE html>
<html lang="en">
	<head>
	<style type="text/css">
		 * {
                margin: 0;
                padding: 0;
            }
            
            table {
                /*设置相邻单元格的边框间的距离*/
                border-spacing: 0;
                /*表格设置合并边框模型*/
                border-collapse: collapse;
                text-align: center;
            }
            /*关键设置 tbody出现滚动条*/
            table tbody {
                display: block;
               /*  overflow-y: scroll; */
               overflow:auto;
            }
            
            table thead,
            tbody tr {
                display: table;
                width: 100%;
                table-layout: fixed;
            }
            /*关键设置：滚动条默认宽度是16px 将thead的宽度减16px*/
            table thead {
                /* width: calc( 100% - 1em) */
            }
            
            
            table thead th {
                background: #ccc;
            }
            
		</style>
		<meta charset="utf-8" />
		<title>面向研究团队的参考文献管理与服务分布式系统</title>
		<meta name="keywords" content="面向研究团队的参考文献管理与服务分布式系统" />
		<meta name="description" content="面向研究团队的参考文献管理与服务分布式系统" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />


		<link href="/ma/css/bootstrap.min.css" rel="stylesheet" />
		<link href="/ma/css/bootstrap-table.css" rel="stylesheet" />
		<link href="/ma/css/bootstrap-editable.css" rel="stylesheet" />
		<link rel="stylesheet" href="/ma/css/font-awesome.min.css" />

		<link rel="stylesheet" href="/ma/css/ace.min.css" />
		<link rel="stylesheet" href="/ma/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="/ma/css/ace-skins.min.css" />

		<script src="/ma/js/ace-extra.min.js"></script>
		<script src="/ma/js/angular.min.js"></script>
		<script src="/ma/js/angular-cookies.min.js"></script>
		<script src="/ma/js/chinese2pinyin.js"></script>
		<link href="/ma/css/jquery-confirm.min.css" rel="stylesheet">
		

	</head>

	<body>

		<div class="navbar navbar-default" id="navbar">
			<script type="text/javascript">
				try {
					ace.settings.check('navbar', 'fixed')
				} catch(e) {}
			</script>
			<div class="navbar-container" id="navbar-container">
				<div class="navbar-header pull-left">
					<a href="#" class="navbar-brand">
						<small>
							<i class="icon-book"></i>
						
							面向研究团队的参考文献管理与服务分布式系统
						</small>
					</a>
					<!-- /.brand -->
				</div>
				<!-- /.navbar-header -->

				<div class="navbar-header pull-right" role="navigation">
					<ul class="nav ace-nav">

						<li class="light-blue">
							<a data-toggle="dropdown" href="#" class="dropdown-toggle">
								<img class="nav-user-photo" src="/ma/avatars/user.jpg" alt="Jason's Photo" />
								<span class="user-info">
									<small>欢迎,</small>
									登录
								</span>

								<i class="icon-caret-down"></i>
							</a>

							<ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
								<li>
									<a href="#">
										<i class="icon-cog"></i> 设置
									</a>
								</li>

								<li>
									<a href="#">
										<i class="icon-user"></i> 简况
									</a>
								</li>

								<li class="divider"></li>

								<li>
									<a href="/ma/user/logout"  class="a_post">
										<i class="icon-off"></i> 登出
									</a>
								</li>
							</ul>
						</li>
					</ul>
					<!-- /.ace-nav -->
				</div>
				<!-- /.navbar-header -->
			</div>
			<!-- /.container -->

		</div>

		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try {
					ace.settings.check('main-container', 'fixed')
				} catch(e) {}
			</script>

			<div class="main-container-inner">
				<a class="menu-toggler" id="menu-toggler" href="#">
					<span class="menu-text"></span>
				</a>

				<div class="sidebar" id="sidebar">
					<script type="text/javascript">
						try {
							ace.settings.check('sidebar', 'fixed')
						} catch(e) {}
					</script>

					<!-- #sidebar-shortcuts -->
					<ul class="nav nav-list">
						<li class="active open">
							<a href="#" class="dropdown-toggle">
								<i class="icon-book"></i>
								<span class="menu-text"> 所有参考文献 </span>

								<b class="arrow icon-angle-down"></b>
							</a>

							<ul class="submenu">
								<li>
									<a href="#" class="dropdown-toggle">
										<i class="icon-double-angle-right"></i>
										图书
										<b class="arrow icon-angle-down"></b>
									</a>
									<ul class="submenu">
										<li>
											<a href="/ma/miuser/Chinesebooks.html">
												<i class="icon-leaf"></i>
												中文图书
											</a>
											
										</li>
										<li>
											<a href="/ma/miuser/Chinesebooks1.html">
												<i class="icon-leaf"></i>
												西文图书
											</a>
											
										</li>
										
									</ul>
								</li>

								<li  class="active open">
									<a href="#" class="dropdown-toggle">
										<i class="icon-double-angle-right"></i>
										期刊
										<b class="arrow icon-angle-down"></b>
									</a>
									<ul class="submenu">
										<li >
											<a href="/ma/miuser/Chinesejournals.html">
												<i class="icon-leaf"></i>
												中文期刊
											</a>
											
										</li>
										<li  class="active">
											<a href="#">
												<i class="icon-leaf"></i>
												西文期刊
											</a>
											
										</li>
										
									</ul>
								</li>

								

								<li>
									<a href="#" class="dropdown-toggle">
										<i class="icon-double-angle-right"></i>
										学位论文
										<b class="arrow icon-angle-down"></b>
									</a>
									
									<ul class="submenu">
										<li>
											<a href="#">
												<i class="icon-leaf"></i>
												中文学位论文
											</a>
											
										</li>
										<li>
											<a href="#">
												<i class="icon-leaf"></i>
												西文学位论文
											</a>
											
										</li>
										
									</ul>
										
								</li>

								<li>
									<a href="#" class="dropdown-toggle">
										<i class="icon-double-angle-right"></i>

										技术报告
										<b class="arrow icon-angle-down"></b>
									</a>

									<ul class="submenu">
										<li>
											<a href="#">
												<i class="icon-leaf"></i>
												中文技术报告
											</a>
										</li>

										<li>
											<a href="#" class="dropdown-toggle">
												<i class="icon-leaf"></i>

												西文技术报告
												
											</a>

										
										</li>
									</ul>
								</li>
								
								<li>
									<a href="#" class="dropdown-toggle">
										<i class="icon-double-angle-right"></i>
										专利
										<b class="arrow icon-angle-down"></b>
									</a>
									<ul class="submenu">
										<li>
											<a href="#">
												<i class="icon-leaf"></i>
												中文专利
											</a>
											
										</li>
										<li>
											<a href="#">
												<i class="icon-leaf"></i>
												西文专利
											</a>
											
										</li>
										
									</ul>
								</li>
							</ul>
						</li>
						<li>
							<a href="#" class="dropdown-toggle">
								<i class="icon-book"></i>
								<span class="menu-text"> 期刊论文集 </span>

								<b class="arrow icon-angle-down"></b>
							</a>

							<ul class="submenu">
								<li>
									<a href="#" class="dropdown-toggle">
										<i class="icon-double-angle-right"></i>
										期刊
										<b class="arrow icon-angle-down"></b>
									</a>
									<ul class="submenu">
										<li class="active">
											<a href="/ma/miuser/journalAdd.html">
												<i class="icon-leaf"></i>
												中文期刊
											</a>
											
										</li>
										<li>
											<a href="/ma/miuser/journalAdd1.html">
												<i class="icon-leaf"></i>
												西文期刊
											</a>
											
										</li>
										
									</ul>
								</li>
								
									<li>
									<a href="#" class="dropdown-toggle">
										<i class="icon-double-angle-right"></i>
										论文集
										<b class="arrow icon-angle-down"></b>
									</a>
									<ul class="submenu">
										<li>
											<a href="#">
												<i class="icon-leaf"></i>
												中文论文集
											</a>
											
										</li>
										<li>
											<a href="#">
												<i class="icon-leaf"></i>
												西文论文集
											</a>
											
										</li>
										
									</ul>
								</li>
								</ul>
								</li>	
						<li>
							<a href="/ma/miuser/referenceGroup.html">
								<i class="icon-dashboard"></i>
								<span class="menu-text"> 参考文献分组 </span>
							</a>
						</li>
						<li>
							<a href="/ma/miuser/email2.html">
								<i class="glyphicon glyphicon-envelope"></i>
								<span class="menu-text"> Email系统 </span>
							</a>
						</li>
						<li>
							<a href="/ma/miuser/message2.html">
								<i class="glyphicon glyphicon-comment"></i>
								<span class="menu-text"> 短信系统 </span>
							</a>
						</li>
						<li>
							<a href="/ma/miuser/indeAdmin.html">
								<i class="glyphicon glyphicon-user"></i>
								<span class="menu-text"> 个人信息 </span>
							</a>
						</li>
						<li>
							<a href="ma/user/logout" class="a_post">
								<i class="glyphicon glyphicon-off"></i>
								<span class="menu-text"> 退出系统 </span>
							</a>
						</li>
						
						
					</ul>
					<!-- /.nav-list -->

					<div class="sidebar-collapse" id="sidebar-collapse">
						<i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
					</div>

					<script type="text/javascript">
						try {
							ace.settings.check('sidebar', 'collapsed')
						} catch(e) {}
					</script>
				</div>

				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<script type="text/javascript">
							try {
								ace.settings.check('breadcrumbs', 'fixed')
							} catch(e) {}
						</script>

						<ul class="breadcrumb">
							<li>
								<i class="icon-home home-icon"></i>
								<a href="#">主页</a>
							</li>
							<li>
								<a href="#">所有参考文献</a>
							</li>
							<li>
								<a href="#">期刊</a>
							</li>

							<li class="active">英文期刊文献</li>
						</ul>
						<!-- .breadcrumb -->

						<!-- #nav-search -->
					</div>

					<div class="page-content">

						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
								<div class="row">
									<div class="col-xs-12">

										

										<div class="table-responsive">
											<div id="toolbar" class="btn-group row">
												<div class="col-md-11" style="width: 500px">
													<div style="float: left">
														<button id="btn_add" type="button" class="btn btn-default"
																onclick="queryJournal(1)">
															<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>新增
														</button>
													</div>
													<div>

														<button type="button" onclick="exportData()" class='btn btn-mini btn-info' style="margin-left: 20px">导出</button>

													</div>
												</div>

											</div>
											<table class="table table-striped table-bordered table-condensed " style="word-break:break-all; word-wrap:break-word;table-layout: fixed; white-space:inherit" id="sample-table-2">

											</table>

										</div>
									</div>
								</div>

								<!-- PAGE CONTENT ENDS -->
							</div>
							<!-- /.col -->
						</div>
						<!-- /.row -->
					</div>
					<!-- /.page-content -->
				</div>
				<!-- /.main-content -->

				<div class="ace-settings-container" id="ace-settings-container">
					<div class="btn btn-app btn-xs btn-warning ace-settings-btn" id="ace-settings-btn">
						<i class="icon-cog bigger-150"></i>
					</div>

					<div class="ace-settings-box" id="ace-settings-box">
						<div>
							<div class="pull-left">
								<select id="skin-colorpicker" class="hide">
									<option data-skin="default" value="#438EB9">#438EB9</option>
									<option data-skin="skin-1" value="#222A2D">#222A2D</option>
									<option data-skin="skin-2" value="#C6487E">#C6487E</option>
									<option data-skin="skin-3" value="#D0D0D0">#D0D0D0</option>
									</select>
							</div>
							<span>&nbsp; 换肤</span>
						</div>

						<div>
							<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-add-container" />
							<label class="lbl" for="ace-settings-add-container">
								居中
								<b></b>
							</label>
						</div>
					</div>
				</div>
				<!-- /#ace-settings-container -->
			</div>
			<!-- /.main-container-inner -->

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="icon-double-angle-up icon-only bigger-110"></i>
			</a>

		</div>
		<div id="myModal" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
			<div class="modal-dialog modal-sm" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
						<h4 class="modal-title">警告</h4>
					</div>
					<div class="modal-body">
						<p>确定删除？</p>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
						<button type="button" class="btn btn-default confirm">确定</button>
					</div>
				</div>
			</div>
		</div>
		<div class="modal fade" id="add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content" style="width:800px">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
						<h4 class="modal-title" id="myModalLabel">英文期刊析出论文录入</h4>
					</div>
					<div class="modal-body">

						<form>
							
						<div class="form-group">
								<div style="width:80px;float:left">请选择期刊：</div>
								<select  id="journalSelect" class="form-control" style="width:120px;float:left">
								
								</select>
								<div style="width:80px;float:left;margin-left:20px">期刊索引号：</div>
								<input id="journalIndex" type="text" style="width:120px;" disabled="disabled">
								
							</div>
							
							<div class="form-group" style="width:420px;float:left;margin-bottom:-5px">
							
						
							
								<div class="form-group" style="float:left">
									<div style="width:80px;float:left">作者姓：</div><input type="text"  placeholder="" style="width:120px; " id="authorName">
								</div>
								<div class="form-group">
									<div style="width:80px;float:left ;margin-left: 20px">作者名：</div><input type="text"  placeholder="" style="width:120px; "id="authorName2">
									
								
								</div>
								<div class="form-group">
									<div style="width:80px;float:left">作者中间名：</div><input type="text"  placeholder="" style="width:150px;"id="authorNameMiddle">
									<input type="button"  value="添加到作者列表>>" style="width:120px;margin-left:5px" name="authorList" onclick="addToAuthorList(1)">
								</div>
								<div class="form-group" style="width:500px">
									<div style="width:80px;float:left">作者Email：</div><input type="text" placeholder="" style="width:150px;float:left" id="authorEmail">
									<div class="col-xs-5 text-center" style="width:160px;font-size:10px;padding:0px 0px 0px 0px">邮箱格式必须为xxxxx@xx.xx</div>
									<div class="col-xs-2 text-center" style="width:20px;color:red;font-size:5px;padding:0px 0px 0px 0px">
							<div id="emailErr8" class="errTxt"><i class="glyphicon glyphicon-remove"></i></div>
						</div>
							</div>
							</div>
							<div class="form-group" style="width:300px;float:right">
							<table width="100%" border="1">
								<thead>
									<tr>
										<th style="text-align:center">序号</th>
										<th style="text-align:center">作者姓名</th>
										<th style="text-align:center">作者Email</th>
									</tr>
								</thead>
								<tbody id="authorTable" style="height:80px">


								</tbody>
							</table>

						</div>
							<div style="clear:both"></div>
							<div class="form-group" style="margin-top:10px">
							<div style="float:left">
								<div style="width:80px;float:left;">年份：</div><input type="text"  placeholder="" style="width:100px;float:left" id="year">
								
								<input type="button"  value="生成索引号" style="width:100px;margin-left:30px" name="index" onclick="produceIndex(1)">
								
							</div>
								<div>
								<div style="width:80px;float:left;margin-left:20px">索引号：</div><input type="text"  placeholder="" style="width:150px;float:left;" disabled="disabled" id="indexNo">
								<div style="margin-left:240px;color:red">*索引号是期刊的唯一标识</div>
								</div>
								
							</div>
							<div class="form-group" style="margin-top:10px">
								<div style="width:80px;float:left;">存放位置：</div><input id="diskPath" type="text"  placeholder="" style="width:350px;">
							</div>
							
							<div class="form-group">
								<div style="width:40px;float:left;">卷：</div><input id="volume" type="text"  placeholder="" style="width:80px;float:left">
								<div style="width:40px;float:left;margin-left:20px">期：</div><input id="num" type="text"  placeholder="" style="width:80px;float:left">
								<div style="width:80px;float:left;margin-left:20px">起始页码：</div><input id="startPage" type="text"  placeholder="" style="width:80px;float:left">
								<div style="width:80px;float:left;margin-left:20px">终止页码：</div><input id="endPage" type="text"  placeholder="" style="width:80px;float:left">
							</div>
							
							<div class="form-group" style="margin-top:50px">
								<div style="width:80px;float:left;">文献名：</div><input id="title" type="text"  placeholder="" style="width:400px;">
							</div>
							
					
							<div class="form-group" style="margin-top:10px">
								<div style="width:80px;float:left;">文件位置：</div><input id="position" type="text"  placeholder="" style="width:400px;">
							</div>

							<div class="form-group">
				<div style="width: 60px; float: left;">关键字1：</div>
				<input id="firstKeyword" type="text" placeholder=""
					style="width: 100px; float: left">
				<div style="width: 60px; float: left; margin-left: 20px;">关键字2：</div>
				<input id="secondKeyword" type="text" placeholder=""
					style="width: 100px; float: left">
				<!-- div style="clear:float;"></div>
								<div style="margin-top:10px"> -->
				<div style="width: 60px; float: left; margin-left: 20px;">关键字3：</div>
				<input id="thirdKeyword" type="text" placeholder=""
					style="width: 100px; float: left">
				<div style="width: 60px; float: left; margin-left: 20px;">关键字4：</div>
				<input id="forthKeyword" type="text" placeholder=""
					style="width: 100px;">
				<!-- </div> -->

			</div>
							<div class="form-group">
								<div style="width:100px;float:left;">参考文献条目：</div><textarea type="text"  id="item"  placeholder="" style="width:400px;height:30px;float:left;overflow:hidden; resize:none;" disabled="disabled"></textarea>
								<input name="generate" type="button"  value="生成文献条目" style="width:100px;margin-left:30px" onclick="generateItem(1)">
							</div>
							<div>
								<div style="width:60px;float:left;">备注：</div><input id="note" type="text"  placeholder="" style="width:500px;">
							</div>
							

						</form>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>关闭</button>
						<button type="button" class="btn btn-primary" data-dismiss="modal"  onclick="submit(1)"><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>保存</button>
					</div>
				</div>
			</div>
		</div>

		<div class="modal fade" id="edit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content" style="width: 800px">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
						<h4 class="modal-title" id="myModalLabel1">编辑</h4>
					</div>
					<div class="modal-body">

						<form>

							<div class="form-group" style="width: 420px; float: left;">
								<div class="form-group">
									<div style="width: 80px; float: left">修改期刊：</div>
									<select id="journalSelect1" class="form-control" style="width: 120px; float: left">

									</select>

									<div style="width: 80px; float: left; margin-left: 10px">期刊索引号：</div>
									<input id="journalIndex1" type="text" style="width: 120px;"
										   disabled="disabled">
								</div>
								<div class="form-group" >
									<div style="width: 80px; float: left;">索引号：</div>
									<input type="text" placeholder="" style="width: 120px;float: left; "
										   disabled="disabled" id="chineseIndexNo">
									<div style="width: 80px; float: left; margin-left: 10px">年份：</div>
									<input type="text" placeholder="" style="width: 100px;"	id="year1" disabled="disabled">
								</div>
								<div class="form-group" style="clear: both;margin-top: 10px">
									<div style="width: 80px; float: left;">存放位置：</div>
									<input id="diskPath1" type="text" placeholder=""
										   style="width:300px;">
								</div>

							</div>

							<div class="form-group" style="width: 300px; float: right; margin-right: 30px;">
								<table width="100%" border="1">
									<thead>
									<tr>
										<th style="text-align: center">序号</th>
										<th style="text-align: center">作者姓名</th>
										<th style="text-align: center">作者Email</th>
									</tr>
									</thead>
									<tbody id="authorTable1" style="height: 80px">
									</tbody>
								</table>

							</div>
							<div style="clear: both"></div>


							<div class="form-group" >
								<div style="width: 40px; float: left;">卷：</div>
								<input id="volume1" type="text" placeholder=""
									   style="width: 80px; float: left">
								<div style="width: 40px; float: left; margin-left: 20px">期：</div>
								<input id="num1" type="text" placeholder=""
									   style="width: 80px; float: left">
								<div style="width: 80px; float: left; margin-left: 20px">起始页码：</div>
								<input id="startPage1" type="text" placeholder=""
									   style="width: 80px; float: left">
								<div style="width: 80px; float: left; margin-left: 20px">终止页码：</div>
								<input id="endPage1" type="text" placeholder=""
									   style="width: 80px; float: left">
							</div>

							<div class="form-group" style="margin-top: 50px">
								<div style="width: 80px; float: left;">文献名：</div>
								<input id="ctitle" type="text" placeholder="" style="width: 450px;">
							</div>

							<div class="form-group" style="margin-top: 10px">
								<div style="width: 80px; float: left;">文件位置：</div>
								<input id="position1" type="text" placeholder=""
									   style="width: 450px;">
							</div>

							<div class="form-group">
								<div style="width: 60px; float: left;">关键字1：</div>
								<input id="firstKeyword1" type="text" placeholder=""
									   style="width: 100px; float: left">
								<div style="width: 60px; float: left; margin-left: 20px;">关键字2：</div>
								<input id="secondKeyword1" type="text" placeholder=""
									   style="width: 100px; float: left">
								<!-- div style="clear:float;"></div>
                                                <div style="margin-top:10px"> -->
								<div style="width: 60px; float: left;margin-left: 20px";>关键字3：</div>
								<input id="thirdKeyword1" type="text" placeholder=""
									   style="width: 100px; float: left">
								<div style="width: 60px; float: left; margin-left: 20px;">关键字4：</div>
								<input id="forthKeyword1" type="text" placeholder=""
									   style="width: 100px;">
								<!-- </div> -->

							</div>

							<div class="form-group">
								<div style="width: 100px; float: left;">参考文献条目：</div>
								<textarea type="text" id="item1" placeholder=""
										  style="width: 400px; height: 100px; float: left; overflow: hidden; resize: none;"
										  disabled="disabled"></textarea>
								<input id="regenerateItem" name="generate" type="button" value="重新生成文献条目"
									   style="width: 130px; margin-left: 30px" onclick="generateItem2(1)">
							</div>
							<div style="clear: both"></div>
							<div style="margin-top: 10px">
								<div style="width: 60px; float: left;">备注：</div>
								<input id="note1" type="text" placeholder="" style="width: 500px;">
							</div>


						</form>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>关闭</button>
						<button type="button" id="btn_submit" class="btn btn-primary" ><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>保存</button>
					</div>
				</div>
			</div>
		</div>

		<script src="/ma/js/jquery-2.0.3.min.js"></script>
		<script src="/ma/js/jquery.cookie.js"></script>

		<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
		</script>
		<script src="/ma/js/bootstrap.min.js"></script>
		<script src="/ma/js/bootstrap-table.js"></script>
		<script src="/ma/js/bootstrap-editable.js"></script>
		<script src="/ma/js/bootstrap-table-zh-CN.js"></script>
		<script src="/ma/js/typeahead-bs2.min.js"></script>

		<!--	<script src="/ma/js/bootstrap-table-export.js"></script>-->
		<script src="/ma/js/bootstrap-table-export.min.js"></script>
		<!--在客户端保存生成的导出文件-->
		<!--	<script src="https://cdn.bootcss.com/FileSaver.js/2014-11-29/FileSaver.min.js"></script>-->

		<script src="/ma/js/tableExport.min.js"></script>

		<script src="/ma/js/ace-elements.min.js"></script>
		<script src="/ma/js/ace.min.js"></script>
		<script src="/ma/journaljs/journal.js"></script>
		<script src="/ma/mainjs/auth.js"></script>
		<script src="/ma/js/jquery-confirm.min.js"></script>

		<script>
			var index1 =""
			$('#sample-table-2').bootstrapTable({
				url: '/ma/journal/queryJournalPaper',
				dataType:'json',
				contentType:'application/x-www-form-urlencoded; charset=UTF-8',
				queryParams : function(params) {
	                    return {
	                          type: 1
	                        };
	            },
				method: 'Post', //请求方式（*）
				toolbar: '#toolbar', //工具按钮用哪个容器
				striped: true, //是否显示行间隔色
				cache: false, //是否使用缓存，默认为true，所以一般情况下需要设置一下这个属性（*）
				pagination: true, //是否显示分页（*）
				sortable: true, //是否启用排序
				sortOrder: "desc", //排序方式
				sidePagination: "client", //分页方式：client客户端分页，server服务端分页（*）
				pageNumber: 1, //初始化加载第一页，默认第一页
				pageSize: 10, //每页的记录行数（*）
				pageList: [10, 25, 50, 100], //可供选择的每页的行数（*）
				search: true, //是否显示表格搜索，此搜索是客户端搜索，不会进服务端，所以，个人感觉意义不大
				strictSearch: false,
				showColumns: true, //是否显示所有的列
				showRefresh: true, //是否显示刷新按钮
				minimumCountColumns: 2, //最少允许的列数
				clickToSelect: true, //是否启用点击选中行
				height: 500, //行高，如果没有设置height属性，表格自动根据记录条数觉得表格高度
				uniqueId: "indexNo", //每一行的唯一标识，一般为主键列
				showToggle: true, //是否显示详细视图和列表视图的切换按钮
				cardView: false, //是否显示详细视图
				detailView: false,
				editable: true,
				toolbarAlign: "left",
				rowStyle: function(row, index) {
					//这里有5个取值代表5中颜色['active', 'success', 'info', 'warning', 'danger'];
					var strclass = "";
					if(row.ORDER_STATUS == "待排产") {
						strclass = 'success'; //还有一个active
					} else if(row.ORDER_STATUS == "已删除") {
						strclass = 'danger';
					} else {
						return {};
					}
					return {
						classes: strclass
					}
				},
				columns: [{
					field : 'indexNo',
					title : '索引号',
					align : 'center',
					width:'100px',
					sortable : true
				},
					{
						field : 'title',
						title : '标题',
						align : 'center',
						width:'150px',
						sortable : true
					},
					{
						field : 'userIndexNoTable.item',
						title : '文献条目',
						align : 'center',
						width:'450px',
						sortable : true

					},
					{
						field : 'userIndexNoTable.stamp',
						title : '添加时间',
						align : 'center',
						width:'180px',
						sortable : true

					},{
						field : 'userIndexNoTable.status',
						title : '状态',
						align : 'center',
						width:'80px',
						sortable : true

					}, {
					title: '操作',
					field: 'id',
					align: 'center',
					formatter: function(value, row, index) {
						var e = '<a class = "edit" href="#" mce_href="#"><i class="icon-pencil bigger-130"></i></i></a> ';
						var d = '<a class = "remove" href="#" mce_href="#" ><i class="icon-trash bigger-130"></i></a> ';
						return e + d;
					},
					events: 'operateEvents'
				}],
				onLoadSuccess: function() {  //加载成功时执行
					var auth = judgeUserAuthority()
					console.log(auth)
					for(var i=0;i<auth.length;i++){
						if(auth[i]=="middleUser"||auth[i]=="primaryUser"){
							$("#sample-table-2").bootstrapTable('hideColumn', 'id');
						}
					}
				}

			});

			window.operateEvents = {
				'click .edit' : function(e, value, row, index) {
					$("#authorTable1").empty()
					document.getElementById("regenerateItem").disabled=false
					getJournal(1)
					index1 = index
					$("#chineseIndexNo").val(row.indexNo)
					$.ajax({
						type: "POST",
						contentType: "application/json",
						data: '{"indexNo":"' + row.indexNo + '","type":"1"}',
						dataType: 'json',
						url: '/ma/journal/queryJournalPaperByIndexNo',
						success: function(data) {
							console.log(data)
							$("#journalIndex1").val(data.journalIndexNo)
							$("#year1").val(data.year)
							$("#diskPath1").val(data.diskPath)
							$("#volume1").val(data.volume)
							$("#num1").val(data.num)
							$("#startPage1").val(data.startPage)
							$("#endPage1").val(data.endPage)
							$("#ctitle").val(data.title);
							$("#firstKeyword1").val(data.firstKeyword);
							$("#secondKeyword1").val(data.secondKeyword);
							$("#thirdKeyword1").val(data.thirdKeyword);
							$("#forthKeyword1").val(data.forthKeyword);
							$("#item1").val(data.userIndexNoTable.item);
							$("#journalSelect1").val(data.journalEnglish.journalName)
							for ( let i in data.authors){
								var authorName = data.authors[i].firstName+" "+data.authors[i].middleName+" "+data.authors[i].lastName
								$("#authorTable1").append("<tr><td>" + data.authors[i].authorOrder + "</td><td >" + authorName + "</td>" +
										"<td>" + data.authors[i].Email + "</td>");

							}
							$('#edit').modal();
						}
					});

				},
				'click .remove': function(e, value, row, index) {
					/*$("#myModal .confirm").attr("onclick","confirmRemove("+row.teamNo+");");*/
					$('#myModal').modal();
					console.log(row);
					$("#myModal .confirm").click(function(e) {
						$.ajax({
							type: "POST",
							contentType: "application/json",
							data: '{"indexNo":"' + row.indexNo + '","type":"1"}',
							dataType: 'json',
							url: '/ma/journal/deleteJournalPaper',
							success: function(data) {
								$('#myModal').modal('hide');
								$('#sample-table-2').bootstrapTable('remove', {
									field: 'indexNo',
									values: [row.indexNo]
								});
							}
						});
					})

				}
			};

			$("#btn_submit").click(function(e) {
				if(!$("#regenerateItem").prop("disabled")){
					$.confirm({
						title: "确认！",
						content: "请先重新生成参考文献条目",
						buttons: {
							ok: {
								text: '确认',
								btnClass: 'btn-primary',
								action: function () {
								}
							}
						}
					})
				}
				else{
					var indexNo =  $("#chineseIndexNo").val()
					$.ajax({
						type: "POST",
						contentType: "application/json",
						data: JSON.stringify({
							'type':"1",
							"indexNo":indexNo,
							'title': $('#ctitle').val(),
							'journalIndexNo': $('#journalIndex1').val(),
							'year': $('#year1').val(),
							'volume': $('#volume1').val(),
							'num': $('#num1').val(),
							'startPage': $('#startPage1').val(),
							'endPage': $('#endPage1').val(),
							'diskPath': $('#diskPath1').val(),
							'position': $('#position1').val(),
							'firstKeyword': $('#firstKeyword1').val(),
							'secondKeyword': $('#secondKeyword1').val(),
							'thirdKeyword': $('#thirdKeyword1').val(),
							'forthKeyword': $('#forthKeyword1').val(),
							'note': $('#note1').val(),
							'item': $('#item1').val(),
						}),
						dataType: 'json',
						url: '/ma/journal/editJournalPaper',
						success: function(data) {
							$('#sample-table-2').bootstrapTable('updateRow', {
								index: index1,
								row: {
									title:$('#ctitle').val(),
									'userIndexNoTable.item':$('#item1').val(),
									'userIndexNoTable.stamp':data,
									'userIndexNoTable.status':2
								}
							});
							$('#edit').modal("hide");
						}
					});
				}

			})
		</script>

	</body>

</html>